@import 'tailwindcss';
@plugin "daisyui";
@import 'xterm/css/xterm.css';

@custom-variant dark (&:where(.dark, .dark *));

@layer base {
  #root {
    @apply h-full;
  }

  html,
  body {
    @apply h-full;

    @apply select-none;

    @apply overflow-hidden;
  }

  header {
    -webkit-app-region: drag;
  }

  button {
    -webkit-app-region: no-drag;
  }

  ::-webkit-scrollbar {
    @apply w-2;
  }

  ::-webkit-scrollbar-thumb {
    @apply bg-[#555] rounded-md;
  }

  ::-webkit-scrollbar-track {
    @apply bg-transparent;
  }
}

@layer utilities {
  .can-select,
  .can-select * {
    @apply select-text;
  }
}

/* xterm: 移除水平滚动条预留空间，避免底部空白 */
@layer base {
  .xterm {
    height: 100%;
  }
  .xterm .xterm-viewport {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-bottom: 0 !important;
  }
}
